import 'dart:math';
import 'package:dio/dio.dart';
import 'package:wallpaper/http/dio_instance.dart';

Future<Response> getFoods({String keyword = ''}) => DioInstance.instance().post(
        path: 'https://tools.mgtv100.com/external/v1/pear/cookbook',
        data: {
          'search_food': keyword,
        });

Future<Response> updateApp() => DioInstance.instance().get(
      path:
          'https://gitee.com/zsnoin-can/new-wall-paper-apk/raw/master/version.json',
      param: {
        'random': Random().nextDouble(),
      },
    );

Future<Response> getWallHavenApiKey() => DioInstance.instance().get(
      path:
          'https://gitee.com/zsnoin-can/new-wall-paper-apk/raw/master/wallhaven_apikey.json',
      param: {
        'random': Random().nextDouble(),
      },
    );

Future<Response> getBocchiWallpaper() => DioInstance.instance().get(
      path:
          'https://gitee.com/zsnoin-can/bocchi/raw/master/bocchi_wallpaper.json',
    );
